package com.mywork.entity.commom;

import lombok.ToString;


@ToString
public enum CommonCode implements ResultCode {
    //未登录
    NOT_LOGIN(10000000, "未登录"),
    //签名异常
    SIGNERROR(10000001, "签名异常"),
    //请求失效
    TIMEERROR(10000002, "请求失效"),
    //参数异常
    PARAMERROR(10000003, "参数缺失" , "http://image01.zjinsl.com/voice/collectvoice/paramerror.mp3"),
    //用户异常
    USERERROR(10000004, "用户异常"),
    //商品不存在
    PRDERROR(10000005, "商品不存在"),
    //商品库存不足
    STORMERROR(10000006, "商品库存不足"),
    //积分不足
    POINTERROR(10000007, "积分不足"),
    //订单不存在
    ORDERERROR(10000007, "订单不存在"),
    //订单重复
    ORDERREPEAT(10000008, "订单重复", "http://image01.zjinsl.com/upimgs/audit/202007/1595378509361.mpeg"),
    //商品已下架
    PRDUNSGELF(10000009, "商品已下架"),
    //商品已停止
    PRDSTOP(10000010, "商品已停止"),
    //商品超出兑换次数
    PRDOVEREXCHANGE(10000011, "商品超出兑换次数"),
    //重复签到
    SIGNEXIST(10000101, "重复签到!"),
    //用户不存在
    USERNOEXIST(10000100, "用户不存在", "http://image01.zjinsl.com/upimgs/audit/202007/1595310645017.mpeg"),

    //登录用户不存在
    LOGINUSERNOEXIST(10000110, "当前用户登陆数据不存在"),
    //用户名或密码错误
    LOGIN_ERROR(10000101, "用户名或密码错误"),
    //用户名或密码错误
    ADMIN_NO_EXIST(10000102, "管理员不存在"),

    NOTMANAGER(10000102, "当前用户不是管理员!"),
    //机器不存在
    MACHNOEXIST(10000201, "设备暂停服务", "http://image01.zjinsl.com/upimgs/audit/202007/1595310301904.mpeg"),
    //机器暂停服务
    MACHPAUSE(10000202, "机器暂停服务"),
    //机器地区不匹配
    MACHAREANOMATCH(10000203, "机器地区不匹配"),
    //商品类型不存在
    PRDTYPENOEXIST(10000204, "商品类型不存在"),
    //订单不存在
    TOILETORDERNOEIST(10000300, "订单不存在"),
    //厕所信息不存在
    TOILETNOEIST(10000301, "厕所信息不存在"),
    //当天不能重复提交
    CAIJIREPAT(10000400, "当天不能重复提交"),
    //厕所信息不存在
    CAIJINOEXIST(10000401, "厕所信息不存在"),
    //一小时内无法重复上传
    TIME_TO_SHORT(10000402, "一小时内无法重复上传", "http://image01.zjinsl.com/upimgs/audit/202007/1595310519729.mpeg"),
    //采集员不存在
    CJ_USER_NOT_EXIST(10000403, "采集员不存在", "http://image01.zjinsl.com/upimgs/audit/202007/1595310194493.mpeg"),
    //村信息不存在
    VILLAGEIDNOEXIST(10000501, "村信息不存在"),
    //村庄信息不匹配 不可跨村庄操作
    REGION_MISMATCH(10000502, "不可跨地区操作"),
    //提交失败
    COMMITFAILED(10008888, "提交失败"),
    //未知异常
    SYSTEMERROR(10009999, "未知异常" , "http://image01.zjinsl.com/voice/collectvoice/unknowerror.mp3"),
    //成功
    SUCCESS(10001000, "操作成功", ""),
    //获取失败
    DEFEATED(10001001, "获取失败"),

    APP_VERSION_NOT_FOUND(10001101, "暂无可更新版本"),

    //获取失败
    ERROR(10001001, "操作失败"),
    //成功
    NODATA(10001001, "操作成功, 但无数据"),
    //用户已存在
    USEREXIST(10001003, "用户已存在"),
    //用户不常住
    NOT_LIVE(10001004, "用户不常住", "http://image01.zjinsl.com/upimgs/audit/202007/1595310620928.mpeg"),
    //用户不常住
    WEIGHT_ERROR(10001005, "重量超出范围", "http://image01.zjinsl.com/upimgs/audit/202007/1595310694497.mpeg"),
    //类型错误
    TYPE_ERROR(10001006, "类型错误"),
    //类型错误
    MAX_UPLOAD(10001007, "已达到最大上传次数", "http://image01.zjinsl.com/upimgs/audit/202007/1595310568023.mpeg"),
    //权限不足
    PERMNOTENOUGH(10001008, "权限不足"),
    //关联用户不存在
    CONUSERNOTEXITS(10000100, "关联用户不存在", "http://image01.zjinsl.com/upimgs/audit/202007/1595310259850.mpeg"),
    //自定义异常
    CUSEXCEPTION(10001001, "自定义异常"),
    //时间错误
    TIME_ERROR(10001002, "时间错误"),
    //绿币信息不存在
    GREEN_COIN_ERROR(10001003, "绿币信息错误", "http://image01.zjinsl.com/upimgs/audit/202007/1595310414872.mpeg"),
    //绿币不足
    GREEN_COIN_NOT_ENOUGH(10001003, "绿币不足"),
    //手机号码已存在
    TELEXIST(10001009, "手机号码已存在"),
    //验证码错误
    MESCODEERROR(10001010, "验证码错误"),
    //验证码过期
    MESCODEOVERTIME(10001011, "验证码过期"),
    //新密码和旧密码不能相同
    OLDANDNEWNOTSAME(10001012, "新密码和旧密码不能相同"),
    //请确认旧密码是否正确
    OLDPASSNOTRIGHT(10001013, "请确认旧密码是否正确"),

    REGION_EMPTY(10005000, "地区信息不能为空"),

    REGION_ERROR(10005001, "地区信息错误"),

    REGION_PARENT_ERROR(10005002, "地区上一级未选择"),

    //时间区间校验未通过
    TIMEINTERVALCHECKFALSE30D(10001014, "起始时间校验未通过"),
    //未能查询到当前地区采集日期数据
    NOCLECTDATE(10001015, "未能查询到当前地区采集日期数据"),
    //图片验证码已过期 请刷新!
    IMGOVERTIME(10001016, "图片验证码已过期 请刷新!"),
    //验证码错误
    IMGERROR(10001017, "验证码错误!"),
    //超过最大图片上传数量
    IMGNUMERROR(10001018, "超过最大图片上传数量!"),

    CJNOTEXIST(10001019, "采集信息不存在"),
    //当前卡号绑定用户不常驻
    CARDTOUSERNOTRES(10001020, "当前卡号绑定用户不常驻", "http://image01.zjinsl.com/upimgs/audit/202007/1595310213857.mpeg"),

    //垃圾袋卡号未找到!
    PACKAGECARDNOEXIST(10001021, "垃圾袋卡号未找到!", "http://image01.zjinsl.com/upimgs/audit/202007/1595310355192.mpeg"),

    //用户卡号未找到!
    CARDNOTEXITS(10001022, "用户卡号未找到!", "http://image01.zjinsl.com/upimgs/audit/202007/1595310657090.mpeg"),

    //当前采集分数计算规则错误
    POINTRULEERROR(10001023, "当前采集分数计算规则错误", "http://image01.zjinsl.com/upimgs/audit/202007/1595643904745.mpeg"),

    //该地区不支持当前类型垃圾上传
    RUBTYPEERROR(10001024, "该地区不支持当前类型垃圾上传!", "http://image01.zjinsl.com/voice/collectvoice/rubtypeerror.mp3"),

    //上传成功
    UPLOADSUCCESS(10001000, "上传成功", "http://image01.zjinsl.com/upimgs/audit/202007/1595585242612.mpeg"),
    //暂停
    CONF_SUSPEND(10002001, "配置已暂停"),

    FACE_IMG_EMPTY(10003001, "人脸图片错误"),

    FACE_EMPTY(10003003, "人脸数据不存在"),

    FACE_EXIST(10003004, "人脸已注册"),

    FACE_MORE(10003003, "人脸识别失败"),

    CARD_EXIST(10001201, "卡号重复"),

    CARD_NOT_EXIST(10001202, "卡号不存在", "http://image01.zjinsl.com/upimgs/audit/202007/1595310657090.mpeg"),

    CARD_NOT_ACTIVE(10001202, "卡号未激活"),

    CARD_TYPE_ERROR(10001204, "副卡不能进行兑换"),

    EQUIP_NOT_CONF(10001301, "设备未配置" ,"http://image01.zjinsl.com/voice/collectvoice/equipnotconf.mp3");


    //操作代码
    int status;
    //提示信息
    String msg;
    //附带信息
    String voice;

    CommonCode(int status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    CommonCode(int status, String msg, String voice) {
        this.status = status;
        this.msg = msg;
        this.voice = voice;
    }


    @Override
    public int status() {
        return status;
    }

    @Override
    public String msg() {
        return msg;
    }

    public String voice() {
        return voice;
    }

}
